package com.rota;

import android.app.Activity;
import android.app.TabActivity;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TabHost;
import android.widget.TabHost.OnTabChangeListener;
import android.widget.TabHost.TabContentFactory;
import android.widget.TabHost.TabSpec;
import android.widget.TextView;
 
public class Rota extends TabActivity implements OnTabChangeListener, TabContentFactory {

  public void onCreate(Bundle paramBundle){
	  super.onCreate(paramBundle);
	  
	  //Criando TabHost
	  TabHost tabHost = getTabHost();
	  tabHost.setOnTabChangedListener(this);
	  
	  //Tela 1 do TabHost
	  TabSpec tabSpec1 = tabHost.newTabSpec("Rota");
	  tabSpec1.setIndicator("Rota",getResources().getDrawable(R.drawable.rotadrive));
	  tabSpec1.setContent(new Intent(this, Rota_Tela1.class));
	  tabHost.addTab(tabSpec1);
	  
	  //Tela 2 do TabHost
	  TabSpec tabSpec2 = tabHost.newTabSpec("Cliente");
	  tabSpec2.setIndicator("Cliente",getResources().getDrawable(R.drawable.cliente));
	  tabSpec2.setContent(new Intent(this, Rota_Tela2.class));
	  tabHost.addTab(tabSpec2);
	  
	  
  } 

  public void onTabChanged(String paramString)
  {
  }
  public View createTabContent(String paramString){
	  TextView localTextView = new TextView(this);
	  localTextView.setText("teste");
	  return localTextView;
  }
}
